-- GENERATED SPELL FOR [Lunaclaw] --


function spell0_12138(pUnit, Event) --@Lunaclaw Spirit,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(18986,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_12138', 1, 1)
end

function spell1_12138(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_12138', 588, 1)
end

function Sorts_12138(pUnit, Event)
local choix_sorts_12138 = math.random(0, 1)
if choix_sorts_12138 == 0 then
pUnit:RegisterEvent('spell0_12138', 1, 1)
end
if choix_sorts_12138 == 1 then
pUnit:RegisterEvent('spell1_12138', 1, 1)
end
end

function mob12138_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12138', math.random(1500, 3000), 1)
end

function mob12138_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12138_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12138_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12138, 1, 'mob12138_Action')
RegisterUnitEvent(12138, 2, 'mob12138_Leave')
RegisterUnitEvent(12138, 3, 'mob12138_Kill')
RegisterUnitEvent(12138, 4, 'mob12138_Die')
